<template>
	<view class="alert">
		<view class="navbar">
			<view class="navbar-group">
				<view class="navbar-item" v-for="(nav, index) in navs" :key="nav.value" @tap="openWin(nav)">
					<view class="navbar-item-content">
						<view class="navbar-right">
							<image class="icon" src="@/static/icon_b1ogyrvee2o/xiangyou.png" mode="aspectFit"></image>
						</view>
						<view class="navbar-header">
							<image class="icon" :src="nav.icon" mode="aspectFit"></image>
						</view>
						<view class="navbar-body">{{ nav.label }}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default{
	data(){
		return {
			navs: [{
				label: '防汛',
				value: 'water',
				icon: require('@/static/city-manage/water.png'),
				url: '/pages/water/index'
			},{
				label: '扫雪除冰',
				value: 'snow',
				icon: require('@/static/city-manage/snow.png'),
				url: '/pages/snow/index'
			},{
				label: '呼叫指挥中心',
				value: 'call',
				icon: require('@/static/icon/call.png'),
				url: '/pages/alert/call?type=send'
			}]
		}
	},
	methods: {
		openWin(data) {
			uni.navigateTo({
				url: data.url
			})
		}
	},
	computed: {
		testA(){ return this.$store.state.db.testA}
	},
	onLoad() {

	},
	onReady() {
	}
}
</script>

<style lang="scss">
	.alert{}

	.navbar{
		padding: 40rpx 60rpx;
		.navbar-group{
			padding: 40rpx 40rpx 20rpx;
			border-radius: 40rpx;
			box-shadow: #b5cede 0px 0px 10px;
			background-color: #ffffff;
			.navbar-item{
				margin-bottom: 20rpx;
				padding: 25rpx 25rpx;
				border: 1rpx solid #dddddd;
				border-radius: 20rpx;
				.navbar-item-content{
					display: flex;
					position: relative;
					top: 0rpx;
					left: 0rpx;
				}

			}
			.navbar-header{
				width: 50rpx;
				height: 50rpx;
				.icon{
					width: 100%;
					height: 100%;
				}
			}
			.navbar-body{
				padding: 8rpx 0rpx 8rpx 50rpx;
				font-size: 28rpx;
				line-height: 34rpx;
			}
			.navbar-right{
				width: 20rpx;
				height: 50rpx;
				position: absolute;
				top: 0rpx;
				right: 0rpx;
				.icon{
					width: 100%;
					height: 100%;
				}
			}
		}
	}

</style>
